// 诊所管理 
import request from "@/untils/request.js"

/**
 * 
 *  post
 *  
 */

// 诊所列表-保存
export const adddocclinic = (data) => {
    return request.post("/outpatient/docclinic", data )
}

// 修改角色
export const editRole = (data) => {
    return request.post("/outpatient/role/edit", data )
}
// 修改菜单
export const editMenu = (data) => {
    return request.post("/outpatient/menu/edit", data )
}
// 删除菜单
export const removeMenu = (data) => {
    return request.post("/outpatient/menu/remove", data )
}
// 诊所管理-修改
export const editdocclinic = (data) => {
    return request.put("/outpatient/docclinic", data )
}


/**
 * 
 * get 
 *  
 */

// 获取诊所列表
export const doccliniclist = (params) => {
    return request.get("/outpatient/docclinic/list", { params })
}

// 诊所管理-分页
export const docclinicPage = (params) => {
    return request.get("/outpatient/docclinic/page", { params })
}

// 获取诊所列表
export const docclinic = (data) => {
    return request.get("/outpatient/docclinic/list", data)
}
// 诊所管理-信息
export const getClinicDetail = (id) => {
    return request.get(`/outpatient/docclinic/${id}`)
}
// 所有角色
export const roleList = (params) => {
    return request.get("/outpatient/role/list", { params } )
}

// 获取角色列表
export const getAllRole = (data) => {
    return request.post("/outpatient/role/page", data )
}
// /outpatient/menu	

//图片修改上传
// export const builderImage = (params) => {
// 	return request.get("/outpatient/builderImage",{params})
// 	}
export function builderImage(params) {
  return request({
    url: '/outpatient/builderImage',
    method: 'post',
    params
  })
}
/**
 * 
 * DELETE 
 *  
 */   
// 诊所管理-删除
export const deleteDocclinic = (data) => {
  return request.delete("/outpatient/docclinic",{ data })
}


// export function leftMenu(params) {
//   return request({
// 	// header:'Authentication',
//     url: '/outpatient/menu',
//     method: 'get',
//     params
//   })
// }
// 暴露
export default{
	adddocclinic,getClinicDetail,editdocclinic,docclinicPage,
docclinic,doccliniclist,deleteDocclinic
}